<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="Mosaddek">
        <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
        <link rel="shortcut icon" href="img/favicon.png">

        <title>Edit user</title>

        <!-- Bootstrap core CSS -->
        <link href="<?php echo base_url() ?>/Resources/Admin/css/bootstrap.min.css" rel="stylesheet">
        <link href="<?php echo base_url() ?>/Resources/Admin/css/bootstrap-reset.css" rel="stylesheet">
        <!--external css-->
        <link href="<?php echo base_url() ?>/Resources/Admin/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>/Resources/Admin/assets/bootstrap-wysihtml5/bootstrap-wysihtml5.css" />
        <!-- Custom styles for this template -->
        <link href="<?php echo base_url() ?>/Resources/Admin/css/style.css" rel="stylesheet">
        <link href="<?php echo base_url() ?>/Resources/Admin/css/style-responsive.css" rel="stylesheet" />
        <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
        <!--[if lt IE 9]>
          <script src="js/html5shiv.js"></script>
          <script src="js/respond.min.js"></script>
        <![endif]-->
    </head>

    <body>

        <section id="container" class="">
            <!--header start-->
            <header class="header white-bg">
                <?php $this->load->view('admin_layout/header') ?>
            </header>
            <!--header end-->
            <!--sidebar start-->
            <aside>
                <div id="sidebar"  class="nav-collapse ">
                    <!-- sidebar menu start-->
                    <?php $this->load->view('admin_layout/sidebar') ?>
                    <!-- sidebar menu end-->
                </div>
            </aside>
            <!--sidebar end-->
            <!--main content start-->
            <section id="main-content">
                <section class="wrapper">
                    <!-- page start-->  <?php      if($this->session->userdata('role') == 1) { ?>
                    <div class="row">
                        <div class="col-lg-12">
                            <section class="panel">
                                <header class="panel-heading">
                                    Edit user
                                </header>
                                <div class="panel-body">
                                <?php if(isset($acc)) { ?>
                                    <div class="form">
                                        <form class="cmxform form-horizontal tasi-form" id="edit_user"  method="POST" >
                                         <div class="col-lg-4">
                                                <div class="form-group ">
                                                    <label for="username" class="control-label col-lg-2">UserName:</label>
                                                    <div class="col-lg-10">
                                                        <input type="text" class="form-control" id="username" name="username" placeholder="Tên User" value="<?php echo $acc->USERNAME ?>" />
                                                    </div>
                                                </div>

                                                <div class="form-group ">
                                                    <label for="password" class="control-label col-lg-2">password </label>
                                                    <div class="col-lg-10">
                                                        <input type="password" class="form-control" id="password" name="password" placeholder="" value="<?php echo $acc->PASSWORD ?>" />
                                                    </div>
                                                </div>
                                                <div class="form-group ">
                                                    <label for="role" class="control-label col-lg-2">Role:</label>
                                                    <div class="col-lg-10"> 
                                                        <select id="role" class="form-control" name="role" >
                                                            <?php if(isset($quyen)) { 
                                                                foreach($quyen as $q) {
                                                                ?>
                                                            <option value="<?php echo $q->ROLE_ID ?>" <?php if ($q->ROLE_ID == $acc->ROLE_ID) echo "selected=selected"; ?>>  <?php echo $q->ROLE_NAME ?></option>
                                                            <?php } } ?>
                                                          </select>
                                                    </div>
                                                </div>     
                                                <div class="form-group ">
                                                    <label for="fullname" class="control-label col-lg-2">Họ tên:</label>
                                                    <div class="col-lg-10"> 
                                                        <input type="text" class="form-control" id="fullname" name="fullname" placeholder="Họ tên" value="<?php echo $acc->FULL_NAME ?>" />
                                                    </div>
                                                </div>
                                                <div class="form-group ">
                                                    <label for="address" class="control-label col-lg-2">Địa chỉ:</label>
                                                    <div class="col-lg-10"> 
                                                        <input type="text" class="form-control" id="address" name="address" placeholder="Địa chỉ" value="<?php echo $acc->ADDRESS ?>" />
                                                    </div>
                                                </div>
                                                <div class="form-group ">
                                                    <label for="phone" class="control-label col-lg-2">Phone:</label>
                                                    <div class="col-lg-10"> 
                                                        <input type="text" class="form-control" id="phone" name="phone" placeholder="Phone" value="<?php echo $acc->PHONE_NUMBER ?>" />
                                                    </div>
                                                </div>     
                                                     
                                            </div>
                                            
                                            
                                            <div class="col-lg-4">
                                                <div class="form-group">
                                                      <label for="email" class="control-label col-lg-4">Email:</label>
                                                      <div class="col-lg-8"> 
                                                      <input type="email" class="form-control" id="email" name="email" placeholder="Email" value="<?php echo $acc->EMAIL ?>" /> </div>
                                                  </div>
                                                  
                                                  <div class="form-group">
                                                      <label for="facebook" class="control-label col-lg-4">Facebook:</label> <div class="col-lg-8"> 
                                                      <input type="text" class="form-control" id="facebook" name="facebook" placeholder="facebook" value="<?php echo $acc->FACEBOOK ?>" /> </div>
                                                  </div>
                                                  
                                                  <div class="form-group">
                                                      <label for="steamprofile" class="control-label col-lg-4">Steam profile:</label> <div class="col-lg-8"> 
                                                      <input type="text" class="form-control" id="steamprofile" name="steamprofile" placeholder="profile" value="<?php echo $acc->STEAM_PROFILE ?>" /> </div>
                                                  </div>
                                                  
                                                  <div class="form-group">
                                                      <label for="steamurl" class="control-label col-lg-4">Steam Offer URL:</label> <div class="col-lg-8"> 
                                                      <input type="text" class="form-control" id="steamurl" name="steamurl" placeholder="offer" value="<?php echo $acc->STEAMOFFER_URL ?>" /> </div>
                                                  </div>
                                                  
                                                
                                                  
                                                  <div class="form-group">
                                                      <label for="avatar" class="control-label col-lg-4">Image URL:</label> <div class="col-lg-8"> 
                                                      <input type="text" class="form-control" id="avatar" name="avatar" placeholder="Link" value="<?php echo $acc->AVATAR ?>" /> </div>
                                                  </div>
                                                  <div class="form-group">
                                                      <label for="wallet" class="control-label col-lg-4">Wallet</label> <div class="col-lg-8"> 
                                                      <input type="text" class="form-control" id="wallet" disabled name="wallet"  value="<?php echo $acc->WALLET ?>" /> </div>
                                                  </div>
                                            </div>
                                             <div class="col-lg-4">
                                                    <img src="<?php echo $acc->AVATAR; ?>" style="width: 100%;max-height: 100%" />
                                                </div>

                                    </div>
                                    <div class="form-group">
                                        <div class="col-lg-offset-5 col-lg-10"> <br />
                                            <input class="btn btn-danger" type="submit" name="capnhat_user" onClick="alert('Cập nhật user thành công');" id="capnhat_user"  value="Save" />
                                            <a href="<?php echo base_url('account/user_manager') ?>"><button class="btn btn-info" type="button">Cancel</button></a>
                                        </div>
                                    </div>
                                    </form>
                                    <?php } ?>
                                </div>
                        </div>
                </section>
                </div>
                </div>
                <!-- page end--> <?php } else echo 'access denied' ?>
            </section>
        </section>
        <!--main content end-->
        <!--footer start-->
        <footer class="site-footer">
<?php $this->load->view('admin_layout/footer') ?>
        </footer>
        <!--footer end-->
    </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="<?php echo base_url() ?>/Resources/Admin/js/jquery.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="<?php echo base_url() ?>/Resources/Admin/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/jquery.scrollTo.min.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script type="text/javascript" src="<?php echo base_url() ?>/Resources/Admin/js/jquery.validate.min.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/respond.min.js" ></script>
    <script type="text/javascript" src="<?php echo base_url() ?>/Resources/Admin/assets/bootstrap-wysihtml5/bootstrap-wysihtml5.js"></script>
    <!--common script for all pages-->
    <script src="<?php echo base_url() ?>/Resources/Admin/js/common-scripts.js"></script>

    <!--script for this page-->
    <script src="<?php echo base_url() ?>/Resources/Admin/js/form-validation-script.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/advanced-form-components.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/form-component.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/bootstrap-switch.js"></script>
    <!--custom tagsinput-->
    <script src="<?php echo base_url() ?>/Resources/Admin/js/jquery.tagsinput.js"></script>
    <!--custom checkbox & radio-->
    <script type="text/javascript" src="js/ga.js"></script>

</body>
</html>